package com.xmtlxx.oms.mapper;

import com.xmtlxx.oms.domain.BoxDept;
import com.xmtlxx.oms.domain.bo.BoxDeptBo;
import com.xmtlxx.oms.domain.vo.BoxDeptVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 箱子领用Mapper接口
 *
 * @author xmtlxx
 * @date 2022-12-07
 */
public interface BoxDeptMapper extends BaseMapperPlus<BoxDeptMapper, BoxDept, BoxDeptVo> {
    /**
     * 根据条件分页查询箱子领用
     *
     * @param boxDept 箱子领用
     * @return Page BoxDept
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "b.create_by"),
        @DataColumn(key = "deptName", value = "b.box_dept"),
        @DataColumn(key = "userName", value = "b.create_by")
    })
    Page<BoxDeptVo> selectPageBoxDeptList(@Param("page") Page<BoxDept> page, @Param("boxDept") BoxDeptBo boxDept);

    /**
     * 查询箱子领用列表
     *
     * @param boxDept 箱子领用
     * @return 箱子领用集合
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "b.create_by"),
        @DataColumn(key = "deptName", value = "b.box_dept"),
        @DataColumn(key = "userName", value = "b.create_by")
    })
    List<BoxDeptVo> selectBoxDeptList(@Param("boxDept") BoxDeptBo boxDept);

    BoxDeptVo selectBoxDeptVoByID(String id);
}
